home *** CD-ROM | disk | FTP | other *** search
- var §\x01§ = 117;
- while(true)
- {
- if(eval("\x01") == 117)
- {
- set("\x01",eval("\x01") + 131);
- §§push(true);
- }
- else if(eval("\x01") == 248)
- {
- set("\x01",eval("\x01") + 9);
- if(§§pop())
- {
- set("\x01",eval("\x01") - 207);
- }
- }
- else
- {
- if(eval("\x01") == 406)
- {
- set("\x01",eval("\x01") + 376);
- nextFrame();
- var _loc4_ = §§pop() + §§pop() * §§pop();
- _loc1_[§§constant(6)](_loc5_);
- _loc1_[§§constant(7)](_loc4_);
- §§pop()[§§pop()] = §§pop();
- _loc2_[§§constant(39)] = function(ang)
- {
- var _loc2_ = new eval(§§constant(1))[§§constant(3)](this[§§constant(9)](),this[§§constant(12)]());
- _loc2_[§§constant(38)](ang);
- return _loc2_;
- };
- _loc2_[§§constant(40)] = function(v)
- {
- return this[§§constant(9)]() * v[§§constant(9)]() + this[§§constant(12)]() * v[§§constant(12)]();
- };
- _loc2_[§§constant(41)] = function()
- {
- return new eval(§§constant(1))[§§constant(3)](- this[§§constant(12)](),this[§§constant(9)]());
- };
- _loc2_[§§constant(42)] = function(v)
- {
- return this[§§constant(40)](v) == 0;
- };
- _loc2_[§§constant(43)] = function(v)
- {
- return this[§§constant(42)](v);
- };
- _loc2_[§§constant(44)] = function(v)
- {
- var _loc3_ = this[§§constant(40)](v);
- var _loc2_ = _loc3_ / (this[§§constant(29)]() * v[§§constant(29)]());
- return eval(§§constant(1))[§§constant(33)][§§constant(45)](_loc2_);
- };
- _loc2_[§§constant(9)] = function()
- {
- return this[§§constant(46)];
- };
- _loc2_[§§constant(6)] = function(x)
- {
- this[§§constant(46)] = x;
- return this[§§constant(9)]();
- };
- _loc2_[§§constant(12)] = function()
- {
- return this[§§constant(47)];
- };
- _loc2_[§§constant(7)] = function(y)
- {
- this[§§constant(47)] = y;
- return this[§§constant(12)]();
- };
- _loc2_[§§constant(48)] = function()
- {
- return this[§§constant(29)]();
- };
- _loc2_[§§constant(49)] = function(len)
- {
- this[§§constant(31)](len);
- return this[§§constant(48)]();
- };
- _loc2_[§§constant(50)] = function()
- {
- return this[§§constant(32)]();
- };
- _loc2_[§§constant(51)] = function(ang)
- {
- this[§§constant(35)](ang);
- return this[§§constant(50)]();
- };
- §§constant(55)(eval(§§constant(1))[§§constant(3)][§§constant(5)],null,1);
- §§push(_loc2_[§§constant(53)](§§constant(52),_loc2_[§§constant(50)],_loc2_[§§constant(51)]));
- §§push(_loc2_[§§constant(53)](§§constant(54),_loc2_[§§constant(48)],_loc2_[§§constant(49)]));
- §§push(_loc2_[§§constant(53)](§§constant(20),_loc2_[§§constant(9)],_loc2_[§§constant(6)]));
- §§push(_loc2_[§§constant(53)](§§constant(21),_loc2_[§§constant(12)],_loc2_[§§constant(7)]));
- break;
- }
- if(eval("\x01") == 257)
- {
- set("\x01",eval("\x01") - 207);
- break;
- }
- if(eval("\x01") == 50)
- {
- set("\x01",eval("\x01") + 770);
- §§push(true);
- }
- else if(eval("\x01") == 820)
- {
- set("\x01",eval("\x01") - 414);
- if(§§pop())
- {
- set("\x01",eval("\x01") + 376);
- }
- }
- else if(eval("\x01") == 782)
- {
- set("\x01",eval("\x01") + 103);
- §§push(true);
- }
- else
- {
- if(eval("\x01") != 885)
- {
- if(eval("\x01") == 827)
- {
- set("\x01",eval("\x01") - 383);
- §§push(§§pop() >>> §§pop());
- break;
- }
- if(eval("\x01") == 444)
- {
- set("\x01",eval("\x01") - 259);
- if(!_global.engine)
- {
- _global.engine = new Object();
- }
- §§pop();
- if(!_global.engine.Auto)
- {
- var _loc2_ = engine.Auto = function(goal, nname, carIni, vert, playerFlag, gameOFunc)
- {
- this.gameOverFunc = gameOFunc;
- var _loc4_ = new math.Vector(carIni._x,carIni._y);
- this.poly = new math.Polygon(goal,nname,_loc4_,vert,carIni._rotation);
- this.autoRotation = carIni._rotation;
- this.autoRotationCur = carIni._rotation;
- this.autoRotationDx = 5;
- this.autoSpeedMax = 7;
- this.autoSpeedDx = 0.5;
- this.autoSpeedBackDx = 0.2;
- this.kofSpeed = 1;
- this.kofAutoV = 0.95;
- this.kofUdarV = 0.9;
- this.labels = 0;
- this.labs = 0;
- this.mass = 100;
- this.autoSpeed = 0;
- this.inRoud = 1;
- this.amountIterations = 0;
- this.udarV = new math.Vector(0,0);
- this.autoV = new math.Vector(0,0);
- this.objName = nname;
- this.gameEngine = goal;
- this.skins = new Array();
- this.player = playerFlag != undefined ? playerFlag : false;
- this.update = this.iteration;
- if(this.player == true)
- {
- this.sound = new Object();
- this.sound.snd_motor = _root.soundArc.playSound("motor",0,true);
- this.sound.snd_gas = _root.soundArc.playSound("gas",0,true);
- this.sound.snd_gas.val = 0;
- this.sound.snd_gas.setVolume(0);
- }
- }.prototype;
- _loc2_.destroy = function()
- {
- for(var _loc2_ in this)
- {
- this[_loc2_].removeMovieClip();
- delete this[_loc2_];
- }
- };
- _loc2_.checkInRoud = function()
- {
- var _loc2_ = 1;
- if(this.player)
- {
- _loc2_ += !this.gameEngine.trassa.trassa.hitTest(this.poly.vertex[1].x + this.poly.pos.x,this.poly.vertex[1].y + this.poly.pos.y,true) ? 0 : 1;
- _loc2_ += !this.gameEngine.trassa.trassa.hitTest(this.poly.vertex[2].x + this.poly.pos.x,this.poly.vertex[2].y + this.poly.pos.y,true) ? 0 : 1;
- _loc2_ = _loc2_ != 0 ? (_loc2_ != 1 ? 1 : 0.9) : 0.8;
- }
- return _loc2_;
- };
- _loc2_.get360 = function(num)
- {
- return num - 360 * Math.floor(num / 360);
- };
- _loc2_.checkFinish = function()
- {
- this.goalLabel = this.gameEngine.trassa["l" + this.labels];
- if(this.goalLabel.hitTest(this.poly.mc))
- {
- this.labels = this.labels + 1;
- if(!this.player)
- {
- }
- if(this.labels >= this.gameEngine.amount)
- {
- this.labs += 1;
- this.labels = 0;
- if(!this.player)
- {
- }
- }
- if(this.labs >= _root.gameInfo.settings.countLabs && this.labels > 0)
- {
- if(this.player)
- {
- this.update = this.iteration;
- this.amountIterationsFinished = this.amountIterations - this.amountIterationsStart;
- this.updateTime = undefined;
- this.sound.snd_gas.setVolume(0);
- this.gameOverFunc.apply(this,[true,this.amountIterationsFinished,this.objName]);
- }
- else
- {
- this.update = this.iteration;
- this.amountIterationsFinished = this.amountIterations - this.amountIterationsStart;
- this.updateTime = undefined;
- this.sound.snd_gas.setVolume(0);
- this.gameOverFunc.apply(this,[false,this.amountIterationsFinished,this.objName]);
- }
- }
- }
- var _loc3_ = new Object();
- _loc3_.x = this.goalLabel._x;
- _loc3_.y = this.goalLabel._y;
- return _loc3_;
- };
- _loc2_.updateWay = function()
- {
- this.iteration(true);
- var _loc4_ = new Object();
- _loc4_ = this.checkFinish();
- var _loc3_ = _loc4_.x - this.poly.pos.x;
- var _loc2_ = _loc4_.y - this.poly.pos.y;
- var _loc5_ = Math.max(Math.abs(_loc3_),Math.abs(_loc2_));
- _loc3_ /= _loc5_;
- _loc2_ /= _loc5_;
- var _loc8_ = new math.Vector(_loc3_,_loc2_);
- var _loc7_ = _loc8_.scaleNew(this.autoSpeedDx);
- this.autoSpeed = _loc7_.plusNew(this.autoV).getLength();
- if(this.autoSpeed < this.autoSpeedMax * this.kofSpeed)
- {
- this.autoV.plus(_loc7_);
- }
- var _loc6_ = this.gameEngine._parent.screens[0].getAngel(this.autoV.getAngle() - this.autoRotation) / 2;
- this.autoRotation += _loc6_;
- this.autoRotationCur = this.autoRotation;
- this.poly.rotatePoly(_loc6_);
- };
- _loc2_.chackKeys = function()
- {
- this.iteration(true);
- this.checkFinish();
- if(Key.isDown(this.keys[2]))
- {
- var _loc5_ = this.autoRotationDx * (this.autoSpeed / this.autoSpeedMax);
- this.autoRotation -= _loc5_;
- this.autoRotationCur = this.autoRotation;
- this.poly.rotatePoly(- _loc5_);
- }
- if(Key.isDown(this.keys[3]))
- {
- _loc5_ = this.autoRotationDx * (this.autoSpeed / this.autoSpeedMax);
- this.autoRotation += _loc5_;
- this.autoRotationCur = this.autoRotation;
- this.poly.rotatePoly(_loc5_);
- }
- this.autoSpeed = this.autoV.getLength();
- var _loc4_ = false;
- if(!Key.isDown(this.keys[4]))
- {
- var _loc2_ = this.autoRotation * 3.141592653589793 / 180;
- var _loc3_ = new math.Vector(0,0);
- if(Key.isDown(this.keys[0]))
- {
- _loc4_ = true;
- this.autoSpeed += this.autoSpeedDx;
- if(this.autoSpeed > this.autoSpeedMax)
- {
- this.autoSpeed = this.autoSpeedMax;
- }
- _loc3_ = new math.Vector(this.autoSpeedDx * Math.cos(_loc2_),this.autoSpeedDx * Math.sin(_loc2_));
- this.autoV.plus(_loc3_);
- var _loc6_ = new math.Vector(this.autoSpeed * Math.cos(_loc2_),this.autoSpeed * Math.sin(_loc2_));
- this.autoV.plus(_loc6_);
- this.autoV.scale(0.5);
- }
- if(Key.isDown(this.keys[1]))
- {
- _loc4_ = true;
- this.autoSpeed -= this.autoSpeedBackDx;
- _loc3_ = new math.Vector(this.autoSpeedBackDx * Math.cos(_loc2_),this.autoSpeedBackDx * Math.sin(_loc2_));
- this.autoV.minus(_loc3_);
- }
- }
- };
- _loc2_.updateTime = function(p)
- {
- var _loc6_ = this.amountIterations - this.amountIterationsStart;
- var _loc4_ = _loc6_ / 10;
- var _loc3_ = Math.floor(_loc4_);
- p.sec.text = _loc3_;
- p.msec.text = Math.round((_loc3_ - _loc4_) * 100);
- p.lapsTxt.text = (this.labs != _root.gameInfo.settings.countLabs ? this.labs + 1 : _root.gameInfo.settings.countLabs) + "/" + _root.gameInfo.settings.countLabs;
- };
- _loc2_.updatePreview = function(p, kof)
- {
- p.preview[this.objName]._x = this.poly.pos.x * kof - 100;
- p.preview[this.objName]._y = this.poly.pos.y * kof - 100;
- };
- _loc2_.updateSpeed = function(p)
- {
- var _loc2_ = this.autoSpeed / this.autoSpeedMax;
- p.speedometr.gotoAndStop(Math.round(15.6 * _loc2_));
- p.speed.text = Math.round(180 * _loc2_);
- };
- _loc2_.iteration = function(how)
- {
- this.autoSpeed = this.autoV.getLength();
- this.amountIterations = this.amountIterations + 1;
- var _loc3_ = this.checkInRoud();
- this.poly.pos.plus(this.udarV);
- this.poly.pos.plus(this.autoV);
- this.autoV.scale(this.kofAutoV - (1 - _loc3_));
- this.udarV.scale(this.kofUdarV - (1 - _loc3_));
- if(this.autoV.getLength() < 0.001)
- {
- this.autoV = new math.Vector(0,0);
- }
- if(this.udarV.getLength() < 0.001)
- {
- this.udarV = new math.Vector(0,0);
- }
- this.renderAuto();
- if(this.player)
- {
- var _loc4_ = _root.gameInfo.settings.effectValue * 0.5 * this.autoSpeed / this.autoSpeedMax;
- this.sound.snd_gas.setVolume(_loc4_);
- this.sound.snd_motor.setVolume(_root.gameInfo.settings.effectValue);
- }
- };
- _loc2_.boom = function(N, t, auto)
- {
- var _loc8_ = 1.01;
- var _loc10_ = new math.Vector(N.x * t * _loc8_,N.y * t * _loc8_);
- this.poly.minus(_loc10_);
- var _loc5_ = auto.poly.pos.x - this.poly.pos.x;
- var _loc4_ = auto.poly.pos.y - this.poly.pos.y;
- var _loc7_ = Math.max(Math.abs(_loc5_),Math.abs(_loc4_));
- _loc5_ /= _loc7_;
- _loc4_ /= _loc7_;
- var _loc9_ = new math.Vector(_loc5_,_loc4_);
- var _loc6_ = this.autoV.getLength() + auto.autoV.getLength();
- _loc7_ = this.mass + auto.mass;
- var _loc12_ = _loc9_.scaleNew(_loc6_ * (this.mass / _loc7_) * 0.5).rotateNew(180);
- var _loc11_ = _loc9_.scaleNew(_loc6_ * (auto.mass / _loc7_) * 0.5);
- _root.soundArc.playSound("crash",0,false,_loc6_ / 2 / this.autoSpeedMax);
- this.setUdarV(_loc12_);
- auto.setUdarV(_loc11_);
- };
- _loc2_.boom2 = function(N, t, obj)
- {
- var _loc6_ = 1.01;
- var _loc7_ = new math.Vector(N.x * t * _loc6_,N.y * t * _loc6_);
- this.poly.minus(_loc7_);
- var _loc4_ = obj.poly.pos.x - this.poly.pos.x;
- var _loc3_ = obj.poly.pos.y - this.poly.pos.y;
- var _loc9_ = Math.max(Math.abs(_loc4_),Math.abs(_loc3_));
- _loc4_ /= _loc9_;
- _loc3_ /= _loc9_;
- var _loc10_ = new math.Vector(_loc4_,_loc3_);
- var _loc5_ = this.autoV.getLength();
- _loc9_ = this.mass + obj.mass;
- var _loc11_ = _loc10_.scaleNew(_loc5_ * (this.mass / _loc9_)).rotateNew(180);
- _root.soundArc.playSound("crash",0,false,_loc5_ / 2 / this.autoSpeedMax);
- this.setUdarV(_loc11_);
- };
- _loc2_.getX = function()
- {
- return this.poly.pos.x;
- };
- _loc2_.getY = function()
- {
- return this.poly.pos.y;
- };
- _loc2_.getRotation = function()
- {
- return this.autoRotationCur;
- };
- _loc2_.setUdarV = function(V)
- {
- this.udarV.plus(V);
- };
- _loc2_.addSkin = function(g)
- {
- this.skins.push(g);
- };
- _loc2_.renderAuto = function()
- {
- this.poly.drawPoly();
- for(var _loc2_ in this.skins)
- {
- this.skins[_loc2_]._parent.updateObject(this.skins[_loc2_],this);
- }
- };
- _loc2_.setKeys = function(code1, code2, code3, code4)
- {
- this.keys = new Array();
- var _loc3_ = 0;
- while(_loc3_ < arguments.length)
- {
- this.keys.push(arguments[_loc3_]);
- _loc3_ = _loc3_ + 1;
- }
- this.player = true;
- };
- _loc2_.setKof = function(kof)
- {
- this.kofSpeed = kof;
- this.player = false;
- };
- _loc2_.setInfoPanel = function(p1, p2)
- {
- this.panel1 = p1;
- this.panel2 = p2;
- };
- _loc2_.startUpdate = function()
- {
- this.amountIterationsStart = this.amountIterations;
- if(this.player)
- {
- this.update = this.chackKeys;
- }
- else
- {
- this.update = this.updateWay;
- }
- };
- §§push(ASSetPropFlags(engine.Auto.prototype,null,1));
- }
- §§pop();
- }
- break;
- }
- set("\x01",eval("\x01") - 58);
- if(§§pop())
- {
- set("\x01",eval("\x01") - 383);
- }
- }
- }
- }
-